package com.stevenmoon.csdnplus.activity.base;

import com.stevenmoon.csdnplus.R;
import com.stevenmoon.csdnplus.widget.SwipeBackLayout;

/**
 * Created by SilenceDut on 2015/12/8.
 */
public abstract class SwipeBackActivity extends BaseActivity {

//    @Bind(R.id.swipeBackLayout)
    SwipeBackLayout mSwipeBackLayout;

//    @Bind(R.id.toolbar)
//    protected Toolbar mToolbar;


    //abstract String getToolbarTitle();


    @Override
    protected void initViews() {
//        initToolBar();
        mSwipeBackLayout = (SwipeBackLayout) findViewById(R.id.swipeBackLayout);
        mSwipeBackLayout.setCallBack(new SwipeBackLayout.CallBack() {
            @Override
            public void onFinish() {
                finish();
            }
        });
    }

//    protected void initToolBar() {
//        mToolbar.setTitle(getToolbarTitle());
//        setSupportActionBar(mToolbar);
//        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
//        mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                onBackPressed();
//            }
//        });
//
//    }



}